# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-scikit-optimize
pkgver=0.7.4
pkgrel=0
pkgdesc="Sequential model-based optimization with a 'scipy.optimize' interface"
url="https://scikit-optimize.github.io/"
arch="noarch !mips !mips64 !s390x" # Blocked by py3-joblib
license="BSD-3-Clause"
depends="python3 py3-numpy py3-scipy py3-scikit-learn py3-joblib py3-matplotlib"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://pypi.python.org/packages/source/s/scikit-optimize/scikit-optimize-$pkgver.tar.gz"
case "$CARCH" in
	# Broken tests on armv7 https://github.com/scikit-optimize/scikit-optimize/issues/900
	# Python fatal abort on armhf
	arm*) options="$options !check" ;;
esac
options="!check" # https://gitlab.alpinelinux.org/alpine/aports/-/issues/11862
builddir="$srcdir/scikit-optimize-$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="38cf9a90a2ee45d9717e565903b5d3835f53eed4dbcf5ae595dfb0bb81bf9b488fe5857c238e7e5ed9cf653ec95881106670d2019d2308ccfb15b8fe00199250  scikit-optimize-0.7.4.tar.gz"
